package com.cxyzy.imageviewdemo

import android.os.Bundle
import androidx.appcompat.app.AppCompatActivity
import com.bumptech.glide.Glide
import com.bumptech.glide.load.resource.bitmap.CircleCrop
import com.bumptech.glide.load.resource.bitmap.RoundedCorners
import com.bumptech.glide.request.RequestOptions
import kotlinx.android.synthetic.main.activity_local.*

class LocalImageActivity : AppCompatActivity() {

    override fun onCreate(savedInstanceState: Bundle?) {
        super.onCreate(savedInstanceState)
        setContentView(R.layout.activity_local)

        Glide.with(this).load(R.drawable.girl)
            .transform(RoundedCorners(100))
            .into(roundCornerImageView)

        Glide.with(this).load(R.drawable.girl)
            .apply(RequestOptions.bitmapTransform(CircleCrop()))
            .into(roundImageView)
    }
}
